package com.uvnos4j.matilda.commons.dto;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 分页结果封装(Easyui)
 *
 * @param <T>
 * @author Guo.wl
 */
@Data
public class GridTable<T> {

    private long total;

    private List<T> rows = null;

    public GridTable(int total) {
        this(total, new ArrayList<T>());
    }

    public GridTable(List<T> rows) {
        this(rows.size(), rows);
    }

    public GridTable(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

}